import Txts from '../static/txt.json';
export default class RanDom {
    //返回以屏幕宽度为最大值随机返回一个数
    static randomX(): number {
        const left = Math.random() * window.innerWidth * 0.8;
        return left;
    }
    //返回随机一句话
    static randomTxt(): string {
        return Txts[Math.floor(Math.random() * Txts.length)];
    }
    //返回随机灯笼背景颜色
    static randomColor(): string {
        let Clors: string[] = ['repeating-radial-gradient(#e1efe6, #52f192)', 'repeating-radial-gradient(white, orange)', 'repeating-radial-gradient(orange, red)', 'repeating-radial-gradient(#e9edf5, #004eff)'];
        return Clors[Math.floor(Math.random() * Clors.length)];
    }
    //随机图片旋转角度
    static randomtran(): string {
        const zfs = ['+', '-', '-'];
        const zf = zfs[Math.floor(Math.random() * zfs.length)];
        const val = Math.floor(Math.random() * 30);
        console.log(`rotate(${zf}${val}deg)`);
        return `rotate(${zf}${val}deg)`;
    }
}